// pages/detail/detail.js
Page({
    data:{

    },
    onLoad:function(options){
        console.log(options.id)
        this.setData({
            mid:options.id
        })
    wx.request({
        // url:"https//apidouban.com/v2/movie/rimdb/tto111161zapikey =0df993c66c0c636e29ecbb5344252a4a",//获取id
        // url:"https//api.douban.com/v2/movie/subject/"+options.id,
        url:"https//liudongtushuguan.com/v2/movie/subject/"+options.id,
        method:"GET",
        // data:{
        //     x:1,y:2
        // },
        header:{
            "content-type":"json"
        },
        success:function(res){
            console.log(res)
            wx.setNavigationBarTitle({
              title: 'title',
            })
        wx.hideNavigationBarLoading({
          success: (res) => {},
        })
        },
        fail:function(){

        },
        complete:function(){//无论成功失败都会调用

        }
    })
    wx.showNavigationBarLoading({
      success: (res) => {},
    })  
    },
    onShareAppMessage:function(){
        return{
            title:"向你推荐"
        }
    }
    
})